package com.google.android.exoplayer2.metadata.id3;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import androidx.annotation.Nullable;
import java.util.Arrays;
import o.anr;

public final class ChapterTocFrame extends Id3Frame {
    public static final Creator<ChapterTocFrame> CREATOR = new Creator<ChapterTocFrame>() {
        public /* synthetic */ Object createFromParcel(Parcel parcel) {
            return ˋ(parcel);
        }

        public /* synthetic */ Object[] newArray(int i) {
            return ॱ(i);
        }

        public ChapterTocFrame ˋ(Parcel parcel) {
            return new ChapterTocFrame(parcel);
        }

        public ChapterTocFrame[] ॱ(int i) {
            return new ChapterTocFrame[i];
        }
    };
    public final String ˊ;
    public final String[] ˋ;
    public final boolean ˎ;
    public final boolean ˏ;
    private final Id3Frame[] ॱ;

    public ChapterTocFrame(String str, boolean z, boolean z2, String[] strArr, Id3Frame[] id3FrameArr) {
        super("CTOC");
        this.ˊ = str;
        this.ˏ = z;
        this.ˎ = z2;
        this.ˋ = strArr;
        this.ॱ = id3FrameArr;
    }

    ChapterTocFrame(Parcel parcel) {
        boolean z = true;
        int i = 0;
        super("CTOC");
        this.ˊ = (String) anr.ˎ(parcel.readString());
        this.ˏ = parcel.readByte() != (byte) 0;
        if (parcel.readByte() == (byte) 0) {
            z = false;
        }
        this.ˎ = z;
        this.ˋ = parcel.createStringArray();
        int readInt = parcel.readInt();
        this.ॱ = new Id3Frame[readInt];
        while (i < readInt) {
            this.ॱ[i] = (Id3Frame) parcel.readParcelable(Id3Frame.class.getClassLoader());
            i++;
        }
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        ChapterTocFrame chapterTocFrame = (ChapterTocFrame) obj;
        if (this.ˏ == chapterTocFrame.ˏ && this.ˎ == chapterTocFrame.ˎ && anr.ˎ(this.ˊ, chapterTocFrame.ˊ) && Arrays.equals(this.ˋ, chapterTocFrame.ˋ) && Arrays.equals(this.ॱ, chapterTocFrame.ॱ)) {
            return true;
        }
        return false;
    }

    public int hashCode() {
        int i;
        int i2 = 1;
        int i3 = 0;
        if (this.ˏ) {
            i = 1;
        } else {
            i = 0;
        }
        i = (i + 527) * 31;
        if (!this.ˎ) {
            i2 = 0;
        }
        i = (i + i2) * 31;
        if (this.ˊ != null) {
            i3 = this.ˊ.hashCode();
        }
        return i + i3;
    }

    public void writeToParcel(Parcel parcel, int i) {
        int i2;
        int i3 = 1;
        parcel.writeString(this.ˊ);
        if (this.ˏ) {
            i2 = 1;
        } else {
            i2 = 0;
        }
        parcel.writeByte((byte) i2);
        if (!this.ˎ) {
            i3 = 0;
        }
        parcel.writeByte((byte) i3);
        parcel.writeStringArray(this.ˋ);
        parcel.writeInt(this.ॱ.length);
        for (Parcelable writeParcelable : this.ॱ) {
            parcel.writeParcelable(writeParcelable, 0);
        }
    }
}
